package com.team3.ecommerce.service;

import com.team3.ecommerce.domain.UserInfo;
import com.team3.ecommerce.mapper.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserInfoServiceImp implements UserInfoService{
    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public UserInfo getUserInfo(String id) {
        return userInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public void setUserInfo(UserInfo userInfo) {
        userInfoMapper.updateByPrimaryKeySelective(userInfo);
    }

    @Override
    public boolean changeRecAddress(UserInfo userInfo) {
        userInfoMapper.updateByPrimaryKeySelective(userInfo);
        return true;//这个要改，要改个try chath的
    }

}
